﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Import Namespace="B2B.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="main_content" runat="server">
<h2>Danh sách sản phẩm theo mục</h2>
<div style="float:left; border-style:dotted; padding-right:10px; width:200px; height:500px"> Khu vuc chon san pham </div>

  <div class="list_product"   align="center" style="float:right;width:900px ">
      <div class="sanpham">
        <div>Sản phẩm 1</div>
        <div style="height:200px"><img src="../../Images/Product/DVD1.jpg" width="200px" height="150px" /></div>
        <div>Min order: 100Unit <br />
            FOB Price: US $11-16 / Piece </div>
        <div><a href="/Product/ProductDetail"> <img src="../../Images/contact.png" /> Contact Supplier </a></div>
     </div>
     
        <%
            foreach (var sanpham in (ArrayList)ViewData["listSP_TheoDM"])
            {
                string maSP = ((SP_DanhSachSanPham)sanpham).MaSanPham.ToString();
                string tenSP = ((SP_DanhSachSanPham)sanpham).TenSanPham.ToString();
                string hinhAnh = ((SP_DanhSachSanPham)sanpham).HinhAnh.ToString();
                string url = "../../Images/Alibaba/" + hinhAnh;
                string gia = ((SP_DanhSachSanPham)sanpham).Gia.ToString();
                string soLuongDatToiThieu = ((SP_DanhSachSanPham)sanpham).SoLuongDatToiThieu.ToString();
                string tenDVT = ((SP_DanhSachSanPham)sanpham).TenDVT.ToString(); 
          %>
            <div class="sanpham">
                <div style="height:40px;overflow:hidden"><a href="/Product/ProductDetail/<%=maSP %>"> <%=tenSP %> </a></div>
                <div style="height:200px"><img style="max-height:150px" class="img-polaroid"src="<%=url %>" /></div>
                <div>Min oder: <%=soLuongDatToiThieu %><br /> FOB: <%=gia %> / <%=tenDVT %></div>
                <div><a href="/Product/ProductDetail/<%=maSP %>"> <img src="../../Images/contact.png" /> Contact Supplier </a></div>
            </div>
            
          <%} %>

  <!--Ket61 thuc-->
  <div class="clr"></div>

  <!--Bắt đầu phân trang-->
  <div>
  <%
      String trang ="";
      int tongtrang = (int)ViewData["tongSP"];
      for (int i = 1; i <= tongtrang; i++)
      {          
  %>
  <a href="#"><%=i %></a>
  <%} %>
  </div>
 
  <!--Kết thúc phân trang-->
  </div>

<div class="clr"></div>
 
</asp:Content>
